The content addressable memory (CAM) reads and writes data, and searches for storage data.
To write data, the CAM transfers write data to a bit line (BL) and allows a row decoder to activate a word line (WL) corresponding to the write address.
To search for data, the CAM activates a search line (SL) based on a data string to be searched for and determines whether data matches each entry in a CAM array. The CAM outputs an address of the matching entry as a search result. One entry stores a data word to be searched for and includes more than one CAM cell. Each entry is provided with a match line (ML). The match line parallel links with the CAM cell corresponding to each entry. The CAM compares the data string to be searched for with a data word stored in each entry. If a match is found as a result of the comparison, the match line corresponding to the entry remains the high level (1). If no match is found as a result of the comparison, electric discharge changes the match line for that entry to the low level (0).
Identifying a voltage level for the match line enables to determine whether the CAM stores data corresponding to the search data.
As a result of the search, the CAM may yield more than one matching entry. In such a case, a priority encoder prioritizes a given entry and outputs the corresponding address.
The CAM is used for a path search in network devices such as a router and a switch or determination of a cache miss or hit in the cache memory. For example, a network router performs IP packet routing. The router stores the CAM that stores IP addresses. The routing collates the IP addresses stored in the CAM with an IP address input from the outside. For example, the CAM in the router writes a value indicating the next destination to an IP packet based on match line information representing the match state and transmits the IP packet from a corresponding port.
Patent Document 1: U.S. Pat. No. 6,967,856
Patent Document 2: Japanese patent laid-open No. 2007-317342
Patent Document 3: Japanese patent laid-open No. 2003-100086
Patent Document 4: U.S. Pat. No. 7,436,688